﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mdb2RIA
{
    public static class PropertyGenerator
    {
        public static string GenerateProperty(string propertyName, Type properyType, params string[] attributes)
        {
            StringBuilder stringBuilder = new StringBuilder();

            foreach (string attribute in attributes)
            {
                stringBuilder.AppendLine("[" + attribute + "]");
            }

            stringBuilder.AppendFormat(
                "{0} {1} {2} {{ get; set; }}",
                "public",
                properyType.Name,
                propertyName
            );

            return stringBuilder.ToString();
        }
    }
}
